Getting Started
What is the DARC Protocol?
Building the source
Since Hardhat and OpenZeppelin are used, the project can be built using the following commands:
Install dependencies
We recommend that you use
pnpm
instead ofnpm
, butnpm
can also work.pnpm
is a newer package manager that has some advantages over npm. It is faster, more efficient, and disk-space friendly.cd darc-protocol
npm installCompile the contracts
npx hardhat compile
Host a local devnet node with hardhat configuration:
npx hardhat node
Test contracts
REPORT_GAS=true npx hardhat test --network localhost
Deploy
To deploy the DARC protocol, you can use the following commands:
npx hardhat run scripts/deploy.js --network <YOUR_NETWORK>
If you want to deploy the DARC protocol to the local devnet, you can use the following command:
npx hardhat run scripts/deploy.js --network localhost
Make sure you have a local devnet node running before deploying the DARC protocol.
If you want to deploy the DARC protocol to the Ethereum mainnet, you can use the following command:
npx hardhat run scripts/deploy.js --network mainnet